package com.wing.sell.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wing.product.model.response.ProductReviewSearchVo;
import com.wing.product.model.response.ReviewDetailVo;
import com.wing.sell.model.entity.OrderProReview;
import com.wing.sell.model.response.OrderProReviewVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 销售订单产品评审表-Dao
 *
 * @author
 */
@Mapper
public interface OrderProReviewDao extends BaseMapper<OrderProReview> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<OrderProReviewVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<OrderProReviewVO> list4app(@Param("page") Page<OrderProReviewVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    OrderProReviewVO get4appById(Long id);

    /**
     * 查询评审列表
     * @param pg
     * @param params
     * @return
     */
    List<ProductReviewSearchVo> getReviewPageBy(@Param("page") Page<ProductReviewSearchVo> pg, @Param("map") Map<String, Object> params,@Param("processId") String processId);

    /**
     * 获取详情
     * @param id
     * @return
     */
    ReviewDetailVo getReviewDetailBy(@Param("id") String id);

    /**
     * 查询评审记录信息（已经评审）
     * @param pg
     * @param params
     * @param processId
     * @return
     */
    List<ProductReviewSearchVo> getReviewRecordPageBy(@Param("page") Page<ProductReviewSearchVo> pg, @Param("map") Map<String, Object> params,@Param("processId") String processId);
}
